package com.kws.merchant.domain;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 合同管理-合同(Contract)表实体类
 *
 * @author yxy
 * @since 2024-10-29 15:51:41
 */
@Data
@ApiModel("合同管理-合同")
@TableName(value = "tb_contract")
public class Contract extends Model<Contract> implements Serializable {
    private static final long serialVersionUID = 458359939636668226L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("$column.comment")
    private Long id;

    @ApiModelProperty("合同编号")
    private String contractNo;

    @ApiModelProperty("合同名称")
    private String contractName;

    @ApiModelProperty("合同类型")
    private Integer contractType;

    @ApiModelProperty("订单编号")
    private Long orderId;

    @ApiModelProperty("所属项目编号")
    private String itemNo;

    @ApiModelProperty("签署顺序 0顺序签署 1并行签署")
    private Integer signSequence;

    @ApiModelProperty("状态0 - 草稿 1 - 签署中 2 - 完成3 - 撤销5 - 过期（签署截至日期到期后触发）7 - 拒签")
    private Integer status;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private Date updateTime;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("合同开始时间")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("合同结束时间")
    private Date endTime;

    @ApiModelProperty("甲方")
    private String firstParty;

    @ApiModelProperty("乙方")
    private String secondParty;

    @ApiModelProperty("合同金额")
    private BigDecimal contractMoney;

    @ApiModelProperty("补充协议编号")
    private String replenishNo;

    @ApiModelProperty("商家id")
    private Long merchantId;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty(value = "可用状态：0-不可用，1-可用")
    private String enable;

    @ApiModelProperty("签署流程ID")
    private String signFlowId;

}
